const button1 = document.createElement("button");
button1.innerText = "加载about-pre页面";
const button2 = document.createElement("button");
button2.innerText = "加载home-pre页面";
document.body.append(button1);
document.body.append(button2);

button1.onclick = function () {
  import(
    /*webpackChunkName:'about'*/
    /*webpackPrefetch:true */
    "./component/about"
  ).then(res => {
    res.about();
    console.log(res.about(), res.default);
  });
};

button2.onclick = function () {
  import(
    /*webpackChunkName:'home'*/
    /*webpackPrefetch:true */
    "./component/home"
  );
};
